﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/TemplateUser.Master" Inherits="System.Web.Mvc.ViewPage" %>
<%@import Namespace="ManageBanking.Models" %>
<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
    <link href="../../Content/css/SucErr1.css" rel="stylesheet" type="text/css" />

    <script src="../../Scripts/functions.js" type="text/javascript"></script>

    <script src="../../Scripts/wysiwyg.js" type="text/javascript"></script>
    <script type="text/javascript">
        $(function() {
            $("#username").autocomplete({
                source: '/Admin/ManageUserAdmin/CompleteUser',
                minLength: 1

            });
        });
</script>
    <style type="text/css">
      
        .green

        {
            float:left;
            color: Green;
            margin-left:218px;
            margin-top:-9px;
        }

        .red

        {   float:left;
            margin-left:218px;
            color: Red;
            margin-top:-9px;
        }
        #divcheck
        {
        float:left;
        margin-left:14px;
        margin-top:-9px;	
        }
        .btnCheck
        {
        margin-left:11px;	
        	
        }
    </style>
    <script type="text/javascript">

        $(document).ready(function() {
            var a = 0;
            $("#username").keyup(function() {
                var status = $("#divcheck");
                status.html("");
                $("#a").attr("value", 0);
            });
            $("#check").click(function() {

                var name = $("#username").val();

                var status = $("#divcheck");

                status.html("Checking....").removeClass(); ;

                $.post("/Admin/ManageUserAdmin/CheckNameUser", { username: name },

                    function(data) {

                        if (data == true) {

                            status.html("Username is not available!").addClass("red");
                            $("#a").attr("value", 0);

                        } else {

                            status.html("Username is  available!").addClass("green");
                            $("#a").attr("value", 1);
                        }

                    });

            });

            $('#f1').submit(function() {
                a = $('#a').attr("value");
                if (a == 0) {
                    alert("Please Check Username,Or Username not valid");
                    return false;
                    
                }
                if (a == 1)
                    return true;
                return false;
            });


        });
    </script>

</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">


<div class="center_block_top"><span>&nbsp;</span><h3>Check Change Information</h3></div>
<div class="center_block_mau"><!--section-->
	<div id="intro" >
<blockquote>
  <% if (ViewData["CheckII"] == "true")
              {
                  %>
         <div class="succes">
					<div class="succes_icon"><!-- --></div>
					<a href="#" class="close" title="Close this notification">x</a>
					<div class="desc">
						<span>Success!</span>
						<p>Success,Your Action Is Success</p>
					</div>
				</div>
				<div class="clear"><!-- --></div>   
				<%} %>
				<%else if (ViewData["CheckII"] != null)
    { %>
				<div class="err">
					<div class="err_icon"><!-- --></div>
					<a href="#" class="close" title="Close this notification">x</a>
					<div class="desc">
						<span>Error!</span>
						<p><%=ViewData["CheckII"]%></p>
					</div>
				</div>
				<%} %>
  <div class="redistry">
  
    	<%using (Html.BeginForm("ResolveChangeInfo", "Cashier", FormMethod.Post, new { @id = "f1" }))
       { %>
  		<ul>
        	<li>
            	<span>User Name:</span>
            	<div class="input_text"></div>
            	<div><input name="username" id="username" type="text" size="20" value="<%=ViewData["user1"] %>" />
            	
            	</div>
            	<div></div>
                <input id="a" type="hidden" />
                <div class="check1">
            	<a id="check" href="#"> Check</a>
                </div>
                <div id="divcheck" class="error" visible="true"></div>
            	</li>
           
            
            <li>
            	<span>Identify Card</span>
            	<div class="input_text"></div>
            	<div><input name="idcard" type="password" id="idcard" size="20"  /></div>
            	
            	</li>
            	
           
           
            
  
           
            
            <li>
            
            	<span>&nbsp;</span>
                <ul>
                	<li ><input type="submit" name="button" value="OK" class="ok"/></li>
            <%} %>
                    <li id="cancel" ><input type="reset" name="button" value="Reset" class="ok" /></li>
                </ul>
            </li>
         
        </ul>
       
  </div>
</blockquote>
<div class="clearBoth"></div>
<blockquote>
 
</blockquote>
</div>
<!--//intro-->
</div>
<div class="center_block_bottom_mau"></div>

</asp:Content>

<asp:Content ID="Content3" ContentPlaceHolderID="ContentPlaceHolderScript" runat="server">

</asp:Content>
